Coordination of cache and memory reservation

ABSTRACT

A method for coordinating cache and memory reservation in a computerized system includes identifying at least one running application, recognizing the at least one application as a latency-critical application, monitoring information associated with a current cache access rate and a required memory bandwidth of the at least one application, allocating a cache partition, a size of the cache partition corresponds to the cache access rate and the required memory bandwidth of the at least one application, defining a threshold value including a number of cache misses per time unit, determining a reduction of cache misses per time unit, in response to the reduction of cache misses per time unit being above the threshold value, retaining the cache partition, assigning a priority of scheduling memory request including a medium priority level, and assigning a memory channel to the at least one application to avoid memory channel contention.

BACKGROUND

The present invention generally relates to assignment of memoryresources, and more particularly to a method for coordinating cache andmemory reservation in a computerized system to ensure quality of service(QoS) by avoiding interferences of applications on cache, memory and/ormemory controller.

A cache is used to speed up data transfer and may be either temporary orpermanent. Memory caches are in every computer to speed up instructionexecution and data retrieval and updating. These temporary caches serveas staging areas, and their contents are constantly changing. A memorycache, or “CPU cache,” is a memory bank that bridges main memory and thecentral processing unit (CPU). A memory cache is faster than main memoryand allows instructions to be executed and data to be read and writtenat higher speed. Instructions and data are transferred from main memoryto the cache in fixed blocks, known as cache “lines.”

SUMMARY

In one aspect, the present disclosure refers to a method forcoordinating cache and memory reservation in a computerized system. Thesystem includes a cache memory, a memory and a memory controller. A setof applications interacts with the memory through the cache memory and aplurality of memory channels. The method includes dynamicallypartitioning the cache memory and the memory channels in order to handlerequests from said applications to said memory controller.

According to a further aspect, a computerized system including a cachememory, a memory and a memory controller is provided. The system isconfigured to enable a set of applications to interact with the memorythrough the cache memory and a plurality of memory channels, the systemincludes a control entity configured to dynamically partition the cachememory and the memory channels in order to handle requests from saidapplications to said memory controller.

According to a further aspect, a computer program product forcoordinating cache and memory reservation in a computerized system isprovided. The computer program product includes a computer readablestorage medium having program instructions embodied therewith, theprogram instructions being executable by a processor to cause theprocessor to execute a method for coordinating cache and memoryreservation as indicated above.

BRIEF DESCRIPTION OF THE DRAWINGS

The following detailed description, given by way of example and notintended to limit the invention solely thereto, will best be appreciatedin conjunction with the accompanying drawings, in which:

FIG. 1 depicts a cloud computing node, according to an embodiment of thepresent disclosure;

FIG. 2 illustrates a cloud computing environment, according to anembodiment of the present disclosure;

FIG. 3 illustrates abstraction model layers, according to an embodimentof the present disclosure;

FIG. 4 illustrates the architecture of a computerized system based on aschematic diagram, according to an embodiment of the present disclosure;

FIG. 5 illustrates a control cycle included in a computerized system,according to the embodiment of FIG. 4;

FIG. 6 illustrates multiple steps for distributing memory resourcesacross multiple VMs handling latency-critical services, according to anembodiment of the present disclosure;

FIG. 7 illustrates a flow chart with multiple steps performed during aniterative control cycle routine, according to an embodiment of thepresent disclosure; and

FIG. 8 illustrates a detailed flow chart of an iterative control cycleroutine, according to an embodiment of the present disclosure.

The drawings are not necessarily to scale. The drawings are merelyschematic representations, not intended to portray specific parametersof the invention. The drawings are intended to depict only typicalembodiments of the invention. In the drawings, like numbering representslike elements.

DETAILED DESCRIPTION

Detailed embodiments of the claimed structures and methods are disclosedherein; however, it can be understood that the disclosed embodiments aremerely illustrative of the claimed structures and methods that may beembodied in various forms. This invention may, however, be embodied inmany different forms and should not be construed as limited to theexemplary embodiments set forth herein. In the description, details ofwell-known features and techniques may be omitted to avoid unnecessarilyobscuring the presented embodiments.

In the interest of not obscuring the presentation of embodiments of thepresent invention, in the following detailed description, someprocessing steps or operations that are known in the art may have beencombined together for presentation and for illustration purposes and insome instances, may have not been described in detail. In otherinstances, some processing steps or operations that are known in the artmay not be described at all. It should be understood that the followingdescription is rather focused on the distinctive features or elements ofvarious embodiments of the present invention.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general-purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 1, a diagram of an example of a cloud computingnode is shown, according to an embodiment of the present disclosure.Cloud computing node 10 is only one example of a suitable cloudcomputing node and is not intended to suggest any limitation as to thescope of use or functionality of embodiments of the invention describedherein. Regardless, cloud computing node 10 is capable of beingimplemented and/or performing any of the functionality set forthhereinabove.

In cloud computing node 10 there is a computer system/server 12, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Referring now to FIG. 2, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment 50 comprises one or morecloud computing nodes 10 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 2 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 50 (FIG. 2) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 3 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® zSeries® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM pSeries® systems; IBMxSeries® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2® database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide).

Virtualization layer 62 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.

In one example, management layer 64 may provide the functions describedbelow. Resource provisioning provides dynamic procurement of computingresources and other resources that are utilized to perform tasks withinthe cloud computing environment. Metering and Pricing provide costtracking as resources are utilized within the cloud computingenvironment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provide pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA.

Workloads layer 66 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; transactionprocessing; and memory resource coordination.

Applications having a high demand for memory resources (e.g., in-memoryanalytics applications) are increasingly being hosted in cloudenvironments where such applications are executed by virtual machines(VMs). However, some of those applications are sensitive to interferenceon system resources, specifically cache, memory bandwidth, or both,meaning performance degrades when applications are co-located in thecloud.

Memory bandwidth may be limited because the memory controller or memorychannels coupling the cache with memory (specifically RAM) formbottlenecks. Specifically, when applications are hosted in a cloudenvironment, such bottlenecks may occur because of contention ofapplications on cache space, memory bandwidth or both. So, sufficientcache space and memory bandwidth are key properties for suchapplications in order to guarantee quality of service (QoS).

Embodiments of the present invention relate to the field of computing,and more particularly to assignment of memory resources. The followingdescribed exemplary embodiments provide a system, method, and computerprogram product to, among other things, coordinate cache and memoryreservation in a computerized system to ensure QoS by avoidinginterferences of applications on cache, memory and/or memory controller.Therefore, the present embodiment has the capacity to improve thetechnical field of assignment of memory resources by introducingreservations to guarantee QoS for latency-critical applications.

The concept may include three levels of reservation which are based oncurrent application usage. By appropriate coordination of such levels ofreservation, improved performance for latency critical applications isachieved. The levels of reservation may include: memory channelpartitioning, memory controller request scheduling (i.e. assigningdifferent priorities to memory controller requests of applications) andcache partitioning, specifically last level cache (LLC) partitioning.The cache partitioning and memory controller request scheduling may becoordinated together, i.e. said LLC partitioning has direct influence onthe memory controller request scheduling. For example, LLC partitioninghas direct influence on the priorities assigned to the memory controllerrequests of the respective applications.

One embodiment by which reservations to guarantee QoS forlatency-critical applications may be introduced is described in detailedbelow by referring to the accompanying drawings in FIGS. 4-8.

Referring now to FIG. 4, a diagram depicting an example systemarchitecture of a computerized system 200 is shown, according to anembodiment of the present disclosure. It should be noted that thefollowing figures may only include system entities relevant forexplaining the basic processes for mitigating contention of memoryresources. Thus, the skilled person may understand that the computerizedsystem 200 may include further entities not shown in the followingfigures because of their minor relevance for the following explanationof memory resource contention mitigation.

The system 200 comprises a host 210, on which multiple VMs 220, 221,222, 223 are running on. However, the present invention should not beunderstood as only being applicable in virtualized computerized systems.The basic idea of the present invention may also be applicable onnon-virtualized multi-processor environments where multiple differentapplications are using common memory resources (cache memory, memorychannels, memory etc.).

In the present embodiment, on VMs 220, 221 (VM-1, VM-2) latency-criticalservices (applications) are running, whereas VMs 222, 223 (VM-3, VM-4)run non-critical services (applications). The VMs 220, 221, 222, 223communicate with cache memory 230. The cache memory 230 may be LLC. Inaddition, multiple memory channels 240, 241, 242 are provided whichenable the VMs 220, 221, 222, 223 to communicate with memory entities250, 251, 252 (e.g. main memory entities). The system 200 may furtherinclude a memory controller 260 adapted to control memory access to thememory entities 250, 251, 252 based on memory requests provided from theVMs 220, 221, 222, 223 to the memory controller 260. In such system 200,different sources of contention may exist. On the one hand, LLCcontention may occur, i.e. different applications use the same cachesection thereby causing cache interference. Such applications may bereferred to as “cache-bound”, i.e. cache is limiting the application'sperformance. On the other hand, memory bandwidth available for therespective application may be a limiting factor. Memory bandwidth may belimited because of memory channel contention or memory controllercontention. Such applications may be referred to as “bandwidth-bound”,i.e. memory bandwidth is limiting the application's performance.

Referring now to FIG. 5, a diagram depicting an extension of thecomputerized system 300 (FIG. 4) is shown, according to an embodiment ofthe present disclosure. It should be noted that all features describedbefore in conjunction with FIG. 4 are applicable to the computerizedsystem 200 described below, unless indicated otherwise. The system 300may include a control entity 310 for coordinating processes for reducingapplication interferences leading to a degradation of QoS. The controlentity 310 may be implemented in hardware or software. In addition, thecontrol entity 310 may include two or more control entity portions wherea first part of control entity portions is hardware-implemented, and asecond part of control entity portions is software-implemented. Based onthe control entity 310, a contention mitigating control cycle isimplemented in order to reduce contention of different applications onsystem resources, specifically memory resources. The control entity 310may receive resource usage information, specifically memory resourceusage information from the VMs or applications and provide coordinatinginformation to the system 300 such that the memory resources can be usedby the respective applications with reduced risk of contention.

More specifically, the control entity 310 may receive informationregarding cache misses (i.e. requests for data which are currently notincluded in the cache, respectively, unsuccessful cache references),cache access rate (i.e. cache accesses per time unit) and/or memorybandwidth usage of a certain application/VM. Based on said informationit is possible for the control entity 310 to determine the currentmemory requirements of the respective application/VM and orchestrate theusage of memory resources of all applications/VMs depending on thecurrent memory requirements in order to reduce application interferencesdue to memory resource bottlenecks.

Based on the received resource usage information, the control entity 310is able to establish coordinating information which controls the usageof memory resources by the respective applications/VMs. By coordinatingthe information, the control entity 310 may control cache partitioningfor the respective applications/VMs, define the size of cachepartitions, define priorities for memory requests of the respectiveapplications/VMs addressed to the memory controller 260 and controlmemory channel partitioning/grouping for the respectiveapplications/VMs. The control entity may receive memory resource usageinformation in a continuous or intermittent way and may providecoordinating information to the system 300 in a continuous orintermittent way in order to change the usage of memory resources by theapplications/VMs depending on the current application requirements, aswill be described in detail below. In other words, the coordination ofinformation by the control entity 310 may be time-variant information inorder to adapt the memory resources reservations to the currentapplication demands.

Referring now to FIG. 6, a diagram depicting the steps performed withinthe control loop are shown, according to an embodiment of the presentdisclosure. First, applications/VMs are classified as beingmemory-resource sensitive (also referred to as “latency-critical”) ornot memory-resource sensitive. In the present example, VMs 220, 221 runmemory-resource sensitive services, which performance is significantlydecreased in case of memory resource contention. The applicationsrunning on VMs 222, 223 are not memory-resource sensitive. In step 1cache is partitioned into cache partitions 231, 232, where a first cachepartition 231 is exclusively reserved for VM 220 and a second cachepartition 232 is exclusively reserved for VM 221. It should be notedthat, in one embodiment, cache partitions 231, 232 are only provided toapplications/VMs being classified as memory-resource sensitive. So, nocache partitions 231, 232 are reserved for VMs 222, 223. The size of thecache partitions 231, 232 may be chosen depending on informationregarding resource usage, specifically, depending on the cache accessrate of the respective application. More specifically, the higher thecache access rate of the respective application the bigger the size ofits cache partition 231, 232.

After partitioning the cache memory 230, the benefit of cachepartitioning for the respective application/VM is checked. Morespecifically, it may be evaluated if the number of cache misses of acertain application/VM decreased because of assigning a cache partitionto such application/VM. According to embodiments, it may be evaluated ifdue to cache partitioning, the cache misses decreased (compared to thesituation without cache partitioning) by a certain amount. For example,a threshold value may be defined which is used to determine whether saidcache partitioning seems to be reasonable. If the delta of cache missesbefore cache partitioning and cache misses after cache partitioning isabove the threshold value, the application (which is running on VM 220,221) may be classified as cache-bound, i.e. cache usage before cachepartitioning was a limiting factor. Otherwise (i.e. delta of cachemisses before cache partitioning and after cache partitioning is belowsaid threshold), the application may be classified as bandwidth-bound,i.e. memory bandwidth is deemed to be the limiting factor.

With continued reference to FIG. 6, in step 2 the cache partition 231associated with VM 220 (respectively, the application running on VM 220)is retained because of the proved performance gain (significantreduction of cache misses). However, cache partition 232 is removedbecause of lack of significant performance gain due to assigning a cachepartition to VM 221 (respectively, the application running on VM 221).So, in other words, after initializing cache partitions, the cachepartitioning is reviewed, and cache partitions are maintained forcache-bound applications/VMs and discarded for bandwidth-boundapplications/VMs.

In step 3, reservations for memory channels 240, 241, 242 andprioritizations of memory controller requests are introduced. Theprioritization may include a memory controller request schedulepriority, i.e. the scheduling of memory controller requests is performedbased on priorities. Such priorities may be assigned to theapplications/VMs depending on the classification if an application/VM iscache-bound, bandwidth-bound or neither of them. Preferably, the highestpriority level is assigned to applications/VMs being classified asbandwidth-bound. Thus, applications/VMs with a high memory bandwidthdemand are privileged compared to other applications. A medium prioritylevel may be assigned to applications/VMs being classified ascache-bound. The cache-bound applications/VMs may be less prioritizedthan bandwidth-bound applications/VMs because it is assumed that theywill have a lower memory access rate because they benefit more fromcache. The lowest priority level may be assigned to applications/VMscorresponding to services which are not critical in the sense oflatency. Based on the priority scheme, requests addressed to the memorycontroller may be scheduled in order to privilege bandwidth-intensiveapplications/VMs.

In addition, latency critical applications/VMs may be distributed acrossdifferent memory channels 240, 241, 242. So, in other words, alsoreservations for certain memory channels 240, 241, 242 may be introducedin order to enable latency critical applications/VMs an improved accessto the memory. In a first step, an attempt is being made that a certainmemory channel 240, 241, 242 is assigned to each latency criticalapplication/VM (cache-bound and bandwidth-bound). In the presentexample, three memory channels 240, 241, 242 are available for twolatency critical applications/VMs. VM 221 is deemed to bebandwidth-bound, i.e. it is assumed that it will have a higher memorybandwidth demand. Therefore, a higher number of memory channels may bereserved for VM 221 compared to VM 220. In case that the number ofavailable memory channels 240, 241, 242 is lower than the number oflatency critical applications/VMs, multiple latency criticalapplications/VMs have to use a certain memory channel. So, in otherwords, two or more latency critical applications/VMs are bound to oneand the same memory channel. In order to further enhance thedistribution of memory resources, a cache-bound and a bandwidth-boundapplication/VM may be grouped to the same memory channel. As mentionedabove, it may be assumed that a bandwidth-bound application/VM may havea higher memory bandwidth demand than a cache-bound application/VM. Bygrouping cache-bound and bandwidth-bound applications/VMs together on acertain memory channel it may be avoided that multiple bandwidth-boundapplications/VM are tied to a certain memory channel thereby causing abottleneck at said memory channel. As such, in case that the number ofavailable memory channels 240, 241, 242 exceed the number oflatency-critical applications/VMs, it is attempted to avoid a groupingof two or more bandwidth-bound applications/VMs to one and the samememory channel, respectively, it is attempted to obtain a mixed groupingof bandwidth-bound and cache-bound applications/VMs at a certain memorychannel in a combination such that the aggregate bandwidth usage is thelowest.

Referring now to FIG. 7, a diagram depicting the dynamicallocation/reservation of memory resources is shown, according to anembodiment of the present disclosure. Based on an iterative passing ofthe control cycle, the memory resources are dynamically distributed tothe latency-critical applications/VMs thereby considering a dynamic,time-variant memory resource usage of the applications/VMs. In a firststep, cache space is allocated for the respective applications/VMs. Thecache space may be allocated dependent, specifically proportional totheir cache access rate (S410). In the following, a cache partition isassigned to the respective applications/VMs (i.e. only forlatency-critical applications/VMs). The assignment may be an exclusivereservation of cache space for the respective application/VM. As alreadymentioned before, depending on the change of cache misses due to theintroduction of cache partitions, the respective latency-criticalapplication/VM is classified as being cache-bound or bandwidth-bound(S420).

Subsequently, based on the classification of a latency-criticalapplication/VM as being cache-bound or bandwidth-bound it is decidedwhether to retain or discard the cache partition for the respectivelatency-critical application/VM. The cache partitions may be maintainedfor the cache-bound applications/VMs and may be removed for thebandwidth-bound applications/VMs (S430). In the following step (S440),memory control request scheduling is introduced based on a priorityregime. As mentioned above, different priorities based on which memorycontrol requests are processed are assigned based on the classificationof the applications/VMs as being cache-bound, bandwidth-bound or none.The highest priority level may be assigned to bandwidth-boundapplications/VMs, a medium priority level may be provided to cache-boundapplications/VMs and the lowest priority level may be provided toapplications/VMs which are not latency-critical. Finally,latency-critical applications/VMs may be distributed across differentmemory channels in order to avoid bottlenecks at the memory channels(S450). As previously described, the distribution may be performed suchthat a memory access of multiple bandwidth-bound applications/VMs via asingle memory channel is avoided even in cases when the number oflatency-critical applications/VMs exceeds the number of available memorychannels.

The previously described steps of forming a memory resource controlcycle may be performed iteratively. The cycle may be steadily runthrough or iterated after termination of a certain time span, e.g. everyn seconds, where n is a natural number. As such, the distribution of thememory resources may be dynamically adapted to the current requirementsof latency-critical applications/VMs in order to guarantee a certainlevel of quality of service.

Referring now to FIG. 8, a flowchart illustrating one cycle of thememory resource control routine is shown, according to an embodiment ofthe present disclosure. After starting the cycle, it is checked whetherthe service of the application/VM is latency-critical or not (S500). Incase of a non-latency-critical service, the application/VM is markedwith a low memory request priority (priority for handling memoryrequests) and the current cycle ends for said application/VM. In case ofa latency-critical application/VM, the current cache access rate and therequired memory bandwidth are monitored (S505). Based on informationregarding the cache access rate and/or the required memory bandwidth, acache partition is allocated, the size of the cache partition maycorrespond to the investigated cache access rate and/or the requiredmemory bandwidth (S510).

After assigning cache partitions to latency-critical applications/VMs,it is investigated whether the number of cache misses per time unit hasbeen reduced or not (S515). As mentioned above, a threshold value may bedefined in order to decide whether the improvement induced by the cachepartitioning is significant. If the reduction of cache misses is abovethe defined threshold, the cache partition is retained (S520) becausethe application/VM is deemed to be cache-bound. Otherwise, the cachepartition is removed (S525) because the application/VM is deemed to bebandwidth-bound.

Depending on retaining/removing the cache partition, the priority ofscheduling memory requests is determined. In case of a cache-boundapplication/VM, the priority level is set to medium (S530), in case of abandwidth-bound application/VM, the priority level is set to high(S535). After assignment of priorities, it is determined whether theapplication/VM is a new one or the application/VM has already beenmonitored in at least one previous cycle (S540). If the application/VMhas already been monitored before, a memory channel assignment hasalready been performed and the current cycle ends for suchapplication/VM. In case of a new application/VM, it is checked whether afree memory channel is available (S545). If so, a free memory channel isassigned to said application/VM in order to avoid memory channelcontention (S550). If no free memory channels are available, in case ofa cache-bound application/VM, memory accesses of a cache-boundapplication/VM are preferably handled via a memory channel in whichmemory accesses of another bandwidth-bound application/VM aretransmitted (S555). On the other hand, memory accesses of abandwidth-bound application/VM are preferably handled via a memorychannel in which memory accesses of another cache-bound application/VMare transmitted (S560). Thus, preferably a bandwidth-boundapplication/VM and a cache-bound application are grouped together at acertain memory channel in order to reduce the risk of memory channelcontention.

Therefore, by coordinating cache and memory reservation, availablesystem resources, specifically available memory resources are used in amore effective manner thereby avoiding performance degrades inapplications sensitive to interference on memory resources.

Stated differently, as the number of in-memory analytics applicationshosted in cloud environments increases, sufficient cache space andmemory bandwidth may be delivered by coordinating cache and memoryreservation which prevents meaning performance of applications sensitiveto interference on cache, memory bandwidth, or both, to be degraded assuch applications are co-located in the cloud, thereby providingsatisfactory QoS.

According to embodiments of the present disclosure, informationregarding resource usage of applications may be gathered and the dynamicpartitioning of cache memory and/or memory channels may be performedbased on the resource usage information. Thereby, the distribution ofsystem resources, specifically of memory resources may be performedbased on current resource usage of applications.

The information regarding resource usage may include cache misses, cacheaccess rate and/or memory bandwidth usage of a certain application.Based on said information, resource usage of a certain application maybe investigated in closer detail and the distribution of systemresources among multiple applications may be controlled according to thespecific resource usage.

The cache memory may be dynamically partitioned based on informationregarding cache misses and information regarding cache access rate. Forexample, based on information regarding the cache access rate of acertain application, the size of a cache memory partition may bedetermined. Information regarding cache misses, specifically informationregarding cache misses before and after cache partitioning may be usedto determine whether a certain cache partition should be maintained fora certain application or not.

The partition size of a cache memory partition associated with a certainapplication is dynamically adapted based on information regardingresource usage, specifically based on the cache access rate of saidapplication. Thereby, the size of cache reserved for a certainapplication may be adapted according to the current cache usage.

Applications running on the computerized system are classified as beingmemory-resource sensitive or not memory-resource sensitive. The wording“memory-resource sensitive application” may generally be understood asan application which shows significant degradation of performance incase of limited memory resources. “Memory-resource sensitiveapplication” may also be referred to as “latency-critical application”or “latency-critical service”.

A memory-resource sensitive application is classified as beingcache-bound or as being memory bandwidth-bound. By means of saidclassification, different kinds of applications may be distinguished,namely a first kind of applications which are limited due to abottleneck of cache space and a second kind of applications which arelimited due to a bottleneck of memory bandwidth. The resourcedistribution may be performed based on said classification information.

The classification (cache-bound or bandwidth-bound) may be establishedbased on a comparison of information indicating cache misses of acertain application before cache memory partitioning and informationindicating cache misses of a certain application after cache memorypartitioning. In case that cache misses are significantly reduced (e.g.at least by a certain threshold value) due to cache memory partitioning,it may be concluded that introducing cache memory partitioning shows asignificant improvement in cache memory usage. Thus, the applicationseems to have been limited due to a bottleneck of cache space(cache-bound). Otherwise, the application is deemed to be limited due toa bottleneck of memory bandwidth (bandwidth-bound).

An application classified as being cache-bound is associated with acertain cache memory partition and a cache memory partition assigned toan application classified as being bandwidth-bound is discarded.Bandwidth-bound applications may not show a significantly improvedperformance due to introducing cache memory partitioning because thememory bandwidth forms a performance bottleneck which could not beaddressed by cache memory partitioning. As such, a cache memorypartition assigned to an application classified as being bandwidth-boundmay be removed.

The classification of a memory-resource sensitive application as beingcache-bound or bandwidth-bound is dynamically reviewed based oninformation indicating current cache misses of a certain application.More in detail, the number of cache misses may be monitored in certainintervals in order to decide whether the classification of amemory-resource sensitive application as being cache-bound orbandwidth-bound can uphold or has to be changed. Thereby a dynamicadaption to application requirements may be obtained.

Memory requests provided to the memory controller are prioritized basedon the classification of the application as being cache-bound orbandwidth-bound. The classification information may also be indicativefor an improved scheduling of controller requests provided to the memorycontroller. Thus, a prioritization regime may be obtained based on saidclassification information.

Memory requests of an application being classified as bandwidth-boundare higher prioritized than memory requests of an application beingclassified as cache-bound. Thereby, the bottleneck due to delayedhandling of memory bandwidth intensive applications may be mitigated.

Memory accesses performed by multiple memory-resource sensitiveapplications are split across different memory channels. Therebycontention of applications due to joint usage of a single memory channelmay be reduced.

At least one cache-bound and at least one bandwidth-bound applicationare associated with a certain memory channel if the number ofapplications identified as memory-resource sensitive exceed the numberof available memory channels. Thereby, memory channel contention may bereduced by bounding memory bandwidth-intensive applications andcache-intensive applications together on a certain memory channel.

Memory resources are assigned to the respective applications based onmemory resource usage of the respective application by dynamicallyassigning cache memory partitions to the respective applications,dynamically assigning memory channel partitions to the respectiveapplications and dynamically assigning priorities to the requests ofapplications provided to the memory controller. Due to said three levelsof reservations/assignments, the quality of service (QoS) oflatency-sensitive applications could be guaranteed without unfairlyimpacting the overall system throughput.

Therefore, dynamically partitioning the cache memory and memory channelsmay be performed iteratively based on consecutive resource usagerefinement loops/cycles. Each resource usage refinement loop comprisesthe steps of: proportionally allocating cache memory space for saidmemory-resource sensitive applications based on cache access rate of therespective application; classifying the respective application ascache-bound or bandwidth-bound; removing or retaining the cache memorypartition of the respective application depending on the applicationsclassification; assigning priorities to the requests of applicationsprovided to the memory controller based on the applicationsclassification; and distributing at least the memory accesses ofbandwidth-bound applications across different memory channels.

In this manner the distribution of the system resources may bedynamically adapted to the current requirements of memory-resourcesensitive, respectively latency sensitive applications.

In some embodiments, the applications are distributed across differentvirtual machines of a virtualized computerized system. Thus, systemresources provided in a cloud environment and providing computationalresources for multiple memory-resource sensitive, respectively latencysensitive applications can be distributed such that the applications mayfulfill certain QoS-guarantees.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration but are not intended tobe exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A method for coordinating cache and memoryreservation in a computerized system comprising a cache memory, a memoryand a memory controller, the method comprising: detecting a firstplurality of virtual machines and a second plurality of virtual machinesin the computerized system, wherein the first plurality of virtualmachines and the second plurality of virtual machines communicate withthe memory through the cache memory and a plurality of memory channels,wherein the first plurality of virtual machines runs latency-criticalservices, and the second plurality of virtual machines runs non-criticalservices; based on the second plurality of virtual machines running thenon-critical services, assigning a low memory request priority; based onthe first plurality of virtual machines running the latency-criticalservices, determining a current cache access rate and a required memorybandwidth of the first plurality of virtual machines; based on thedetermined current cache access rate and the required memory bandwidth,proportionally allocating a cache partition to the first plurality ofvirtual machines, wherein a size of the cache partition corresponds tothe determined cache access rate and the required memory bandwidth;defining a threshold value comprising a number of cache misses per timeunit, wherein the threshold value helps determining whether animprovement caused by the cache partitioning is significant; based onthe number of cache misses per time unit being above the thresholdvalue, identifying one or more virtual machines in the first pluralityof virtual machines as cache-bound and retaining the cache partition;receiving a memory request; based on the one or more virtual machines inthe first plurality of virtual machines being identified as cache-bound,assigning a medium priority for scheduling the memory request; based onthe number of cache misses per time unit being below the thresholdvalue, identifying one or more virtual machines in the first pluralityof virtual machines as bandwidth-bound and removing the cache partition;based on the one or more virtual machines in the first plurality ofvirtual machines being identified as bandwidth-bound, assigning a highpriority for scheduling the memory request, wherein a bandwidth-boundvirtual machine comprises a higher memory bandwidth demand than acache-bound virtual machine; determining whether free memory channelsare available; based on determining that a number of free memorychannels is less than the first plurality of virtual machines, assigningat least one cache-bound virtual machine and at least one bandwidthbound virtual machine to a single memory channel; and based ondetermining that the number of free memory channels exceeds the firstplurality of virtual machines, preventing two or more bandwidth-boundvirtual machines from being assigned to a single memory channel, andassigning a mixed grouping of bandwidth-bound virtual machines andcache-bound virtual machines to a single memory channel such that anaggregate bandwidth usage of the mixed grouping is the lowest.